<feed xmlns='http://www.w3.org/2005/Atom'>
<title>archives/zarb-ml/mageia-dev/2012-April/014816.html, branch master</title>
<subtitle>Zarb.org Mailing List Archives</subtitle>
<link rel='alternate' type='text/html' href='https://gitweb.mageia.org/web/archives/'/>
<entry>
<title>Add zarb MLs html archives</title>
<updated>2013-04-14T13:46:12+00:00</updated>
<author>
<name>Nicolas Vigier</name>
<email>boklm@mageia.org</email>
</author>
<published>2013-04-14T13:46:12+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.mageia.org/web/archives/commit/?id=1be510f9529cb082f802408b472a77d074b394c0'/>
<id>1be510f9529cb082f802408b472a77d074b394c0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
></a></td>
<td class='main'><a href='/'>index</a> : <a title='drakx' href='/software/drakx/'>drakx</a></td><td class='form'><form method='get'>
<input type='hidden' name='id' value='cebb882bbb82549f1798b8fc4b37d76be90a869b'/><select name='h' onchange='this.form.submit();'>
<option value='distro/mdv2007.1'>distro/mdv2007.1</option>
<option value='distro/mdv2008.0'>distro/mdv2008.0</option>
<option value='distro/mdv2008.1'>distro/mdv2008.1</option>
<option value='distro/mdv2009.0'>distro/mdv2009.0</option>
<option value='distro/mdv2009.1'>distro/mdv2009.1</option>
<option value='distro/mdv2010.0'>distro/mdv2010.0</option>
<option value='distro/mes5'>distro/mes5</option>
<option value='distro/mes5-2.6.33'>distro/mes5-2.6.33</option>
<option value='distro/mes6'>distro/mes6</option>
<option value='distro/mga1'>distro/mga1</option>
<option value='distro/mga2'>distro/mga2</option>
<option value='distro/mga3'>distro/mga3</option>
<option value='distro/mga4'>distro/mga4</option>
<option value='distro/mga5'>distro/mga5</option>
<option value='distro/mga6'>distro/mga6</option>
<option value='distro/mga7'>distro/mga7</option>
<option 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=15.50'>summary</a><a href='/software/drakx/refs/?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>refs</a><a href='/software/drakx/log/?h=15.50'>log</a><a href='/software/drakx/tree/?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>tree</a><a class='active' href='/software/drakx/commit/?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>commit</a><a href='/software/drakx/diff/?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>diff</a><a href='/software/drakx/stats/?h=15.50'>stats</a></td><td class='form'><form class='right' method='get' action='/software/drakx/log/'>
<input type='hidden' name='h' value='15.50'/><input type='hidden' name='id' value='cebb882bbb82549f1798b8fc4b37d76be90a869b'/><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='15.50'/><input type='hidden' name='id' value='cebb882bbb82549f1798b8fc4b37d76be90a869b'/><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>Thierry Vignaud &lt;tv@mageia.org&gt;</td><td class='right'>2012-06-01 17:25:22 +0000</td></tr>
<tr><th>committer</th><td>Thierry Vignaud &lt;tv@mageia.org&gt;</td><td class='right'>2012-06-01 17:25:22 +0000</td></tr>
<tr><th>commit</th><td colspan='2' class='sha1'><a href='/software/drakx/commit/?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>cebb882bbb82549f1798b8fc4b37d76be90a869b</a> (<a href='/software/drakx/patch/?id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>patch</a>)</td></tr>
<tr><th>tree</th><td colspan='2' class='sha1'><a href='/software/drakx/tree/?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>aa04026f1b22781d668ed02d04688e1f48cd008c</a></td></tr>
<tr><th>parent</th><td colspan='2' class='sha1'><a href='/software/drakx/commit/?h=15.50&amp;id=f8b5c22e2584741f2c522ffc86486bc073f943ce'>f8b5c22e2584741f2c522ffc86486bc073f943ce</a> (<a href='/software/drakx/diff/?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b&amp;id2=f8b5c22e2584741f2c522ffc86486bc073f943ce'>diff</a>)</td></tr><tr><th>download</th><td colspan='2' class='sha1'><a href='/software/drakx/snapshot/drakx-cebb882bbb82549f1798b8fc4b37d76be90a869b.tar'>drakx-cebb882bbb82549f1798b8fc4b37d76be90a869b.tar</a><br/><a href='/software/drakx/snapshot/drakx-cebb882bbb82549f1798b8fc4b37d76be90a869b.tar.gz'>drakx-cebb882bbb82549f1798b8fc4b37d76be90a869b.tar.gz</a><br/><a href='/software/drakx/snapshot/drakx-cebb882bbb82549f1798b8fc4b37d76be90a869b.tar.bz2'>drakx-cebb882bbb82549f1798b8fc4b37d76be90a869b.tar.bz2</a><br/><a href='/software/drakx/snapshot/drakx-cebb882bbb82549f1798b8fc4b37d76be90a869b.tar.xz'>drakx-cebb882bbb82549f1798b8fc4b37d76be90a869b.tar.xz</a><br/><a href='/software/drakx/snapshot/drakx-cebb882bbb82549f1798b8fc4b37d76be90a869b.zip'>drakx-cebb882bbb82549f1798b8fc4b37d76be90a869b.zip</a><br/></td></tr></table>
<div class='commit-subject'>link against system libraries for newt &amp; slang too (from mdv)</div><div class='commit-msg'></div><div class='diffstat-header'><a href='/software/drakx/diff/?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>Diffstat</a></div><table summary='diffstat' class='diffstat'><tr><td class='mode'>-rw-r--r--</td><td class='upd'><a href='/software/drakx/diff/mdk-stage1/Makefile?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>mdk-stage1/Makefile</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.1%;'/><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/mdk-stage1/NEWS?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>mdk-stage1/NEWS</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/mdk-stage1/newt-frontend.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>mdk-stage1/newt-frontend.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: 99.9%;'/></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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>mdk-stage1/newt/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.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/newt/button.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>mdk-stage1/newt/button.c</a></td><td class='right'>192</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/newt/buttonbar.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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.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/newt/checkbox.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>mdk-stage1/newt/checkbox.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: 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/newt/checkboxtree.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/newt/entry.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>mdk-stage1/newt/entry.c</a></td><td class='right'>378</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/newt/form.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>mdk-stage1/newt/form.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: 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/newt/grid.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 7.0%;'/><td class='none' style='width: 93.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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/listbox.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 13.6%;'/><td class='none' style='width: 86.4%;'/></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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 12.1%;'/><td class='none' style='width: 87.9%;'/></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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/newt/newt_pr.h?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/scale.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/newt/scrollbar.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/newt/textbox.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/newt/windows.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/slang/Makefile?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>mdk-stage1/slang/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.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/_slang.h?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 13.4%;'/><td class='none' style='width: 86.6%;'/></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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/slang/jdmacros.h?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/slang/keywhash.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/slang/sl-feat.h?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/slang/slang.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 100.0%;'/><td class='none' style='width: 0.0%;'/></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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 34.8%;'/><td class='none' style='width: 65.2%;'/></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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 29.9%;'/><td class='none' style='width: 70.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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 14.1%;'/><td class='none' style='width: 85.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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 56.6%;'/><td class='none' style='width: 43.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.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 8.4%;'/><td class='none' style='width: 91.6%;'/></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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/slarrmis.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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.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/slang/slassoc.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/slbstr.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 11.1%;'/><td class='none' style='width: 88.9%;'/></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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 25.1%;'/><td class='none' style='width: 74.9%;'/></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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 6.3%;'/><td class='none' style='width: 93.7%;'/></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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 20.6%;'/><td class='none' style='width: 79.4%;'/></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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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.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/slcurses.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 17.5%;'/><td class='none' style='width: 82.5%;'/></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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 6.4%;'/><td class='none' style='width: 93.6%;'/></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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 46.8%;'/><td class='none' style='width: 53.2%;'/></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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/slerrno.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/slang/slgetkey.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/slang/slimport.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 5.1%;'/><td class='none' style='width: 94.9%;'/></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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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.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/slintall.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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.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/slistruc.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/slang/slkeymap.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 10.7%;'/><td class='none' style='width: 89.3%;'/></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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/slang/sllimits.h?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/slmalloc.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/slang/slmath.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 10.2%;'/><td class='none' style='width: 89.8%;'/></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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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.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/slmemcmp.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/slmemcpy.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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.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/slang/slmemset.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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.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/slang/slmisc.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/slang/slnspace.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/slospath.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/slpack.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 14.2%;'/><td class='none' style='width: 85.8%;'/></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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 35.5%;'/><td class='none' style='width: 64.5%;'/></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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 6.2%;'/><td class='none' style='width: 93.8%;'/></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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 19.1%;'/><td class='none' style='width: 80.9%;'/></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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 10.2%;'/><td class='none' style='width: 89.8%;'/></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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/mdk-stage1/slang/slproc.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/slregexp.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 16.9%;'/><td class='none' style='width: 83.1%;'/></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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/slang/slscanf.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/slscroll.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 8.1%;'/><td class='none' style='width: 91.9%;'/></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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/slsignal.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/slsmg.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 28.6%;'/><td class='none' style='width: 71.4%;'/></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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/slstdio.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 18.9%;'/><td class='none' style='width: 81.1%;'/></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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/slang/slstrops.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 30.4%;'/><td class='none' style='width: 69.6%;'/></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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 16.8%;'/><td class='none' style='width: 83.2%;'/></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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/slang/sltime.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 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/sltoken.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 30.7%;'/><td class='none' style='width: 69.3%;'/></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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 17.4%;'/><td class='none' style='width: 82.6%;'/></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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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: 10.7%;'/><td class='none' style='width: 89.3%;'/></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=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>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.8%;'/><td class='none' style='width: 99.2%;'/></tr></table></td></tr>
</table><div class='diffstat-summary'>87 files changed, 9 insertions, 52614 deletions</div><table summary='diff' class='diff'><tr><td><div class='head'>diff --git a/mdk-stage1/Makefile b/mdk-stage1/Makefile<br/>index 586596bb4..a4ef5d428 100644<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/Makefile?h=15.50&amp;id=f8b5c22e2584741f2c522ffc86486bc073f943ce'>mdk-stage1/Makefile</a><br/>+++ b/<a href='/software/drakx/tree/mdk-stage1/Makefile?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>mdk-stage1/Makefile</a></div><div class='hunk'>@@ -70,16 +70,19 @@ INITOBJS = $(subst .c,.o,$(INITSRC))</div><div class='ctx'> </div><div class='ctx'>  #- frontends</div><div class='ctx'> NEWT_FRONTEND_SRC = newt-frontend.c</div><div class='del'>-NEWT_FRONTEND_LIBS = newt/libnewt.a slang/libslang.a</div><div class='add'>+NEWT_FRONTEND_LIBS = libnewt.a libslang.a</div><div class='ctx'> </div><div class='ctx'> STDIO_FRONTEND_SRC = stdio-frontend.c</div><div class='ctx'> STDIO_FRONTEND_LIBS =</div><div class='ctx'> STDIO_FRONTEND_LIBS =</div><div class='ctx'> </div><div class='del'>-</div><div class='ctx'> FRONTEND_OBJS = $(subst .c,.o,$($(F)_FRONTEND_SRC))</div><div class='ctx'> </div><div class='add'>+ifeq (DIETLIBC, $(L))</div><div class='add'>+FRONTEND_LINK = $(FRONTEND_OBJS) $(patsubst %,/usr/lib/dietlibc/lib-$(ARCH)/%,$($(F)_FRONTEND_LIBS))</div><div class='add'>+else</div><div class='ctx'> FRONTEND_LINK = $(FRONTEND_OBJS) $($(F)_FRONTEND_LIBS)</div><div class='add'>+endif</div><div class='ctx'> </div><div class='ctx'> STAGE1_STATIC_LIBS =</div><div class='ctx'> STAGE1_STATIC_USR_LIBS = libz.a libldetect.a libkmod.a libpci.a liblzma.a libsysfs.a</div><div class='hunk'>@@ -127,7 +130,7 @@ STAGE1OBJS-FULL = $(subst .c,-FULL.o,$(STAGE1_ALLSRC))</div><div class='ctx'> </div><div class='ctx'> BINS = init stage1 dhcp-client rescue-gui probe-modules</div><div class='ctx'> </div><div class='del'>-DIRS += pci-resource usb-resource slang newt</div><div class='add'>+DIRS += pci-resource usb-resource</div><div class='ctx'> ifeq (i386, $(ARCH))</div><div class='ctx'> DIRS += pcmcia pcmcia-resource</div><div class='ctx'> endif</div><div class='head'>diff --git a/mdk-stage1/NEWS b/mdk-stage1/NEWS<br/>index 6f44e4e7e..8b3d476f4 100644<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/NEWS?h=15.50&amp;id=f8b5c22e2584741f2c522ffc86486bc073f943ce'>mdk-stage1/NEWS</a><br/>+++ b/<a href='/software/drakx/tree/mdk-stage1/NEWS?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>mdk-stage1/NEWS</a></div><div class='hunk'>@@ -3,7 +3,7 @@</div><div class='ctx'> - hide "KA server" option (mga#5944)</div><div class='ctx'> - switch from gethostbyname() to getaddrinfo() (mga#4056)</div><div class='ctx'> - switch from gethostbyaddr() to getnameinfo()</div><div class='del'>-- use system library for sysfs (mdv)</div><div class='add'>+- use system libraries for newtw, slang &amp; sysfs (mdv)</div><div class='ctx'> </div><div class='ctx'> 1.65</div><div class='ctx'> - load btrfs module to mount btrfs</div><div class='head'>diff --git a/mdk-stage1/newt-frontend.c b/mdk-stage1/newt-frontend.c<br/>index e8a6ef6d3..6bdded9d3 100644<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/newt-frontend.c?h=15.50&amp;id=f8b5c22e2584741f2c522ffc86486bc073f943ce'>mdk-stage1/newt-frontend.c</a><br/>+++ b/<a href='/software/drakx/tree/mdk-stage1/newt-frontend.c?h=15.50&amp;id=cebb882bbb82549f1798b8fc4b37d76be90a869b'>mdk-stage1/newt-frontend.c</a></div><div class='hunk'>@@ -32,7 +32,7 @@</div><div class='ctx'> #include &lt;stdio.h&gt;</div><div class='ctx'> #include &lt;stdarg.h&gt;</div><div class='ctx'> #include &lt;sys/time.h&gt;</div><div class='del'>-#include "newt/newt.h"</div><div class='add'>+#include &lt;newt.h&gt;</div><div class='ctx'> </div><div class='ctx'> #include &lt;probing.h&gt;</div><div class='ctx'> </div><div class='hunk'>@@ -299,7 +299,7 @@ static int mynewtWinEntries(char * title, char * text, int suggestedWidth, int f</div><div class='ctx'> 	for (i = 0; i &lt; numItems; i++) {</div><div class='ctx'> 		newtComponent entr = newtEntry(-1, -1, items[i].value ? </div><div class='ctx'> 					       *items[i].value : NULL, dataWidth,</div><div class='del'>-					       items[i].value, items[i].flags);</div><div class='add'>+					       (const char**)items[i].value, items[i].flags);</div><div class='ctx'> </div><div class='ctx'> 		newtGridSetField(subgrid, 0, i, NEWT_GRID_COMPONENT,</div><div class='ctx'> 				 newtLabel(-1, -1, items[i].text),</div><div class='head'>diff --git a/mdk-stage1/newt/Makefile b/mdk-stage1/newt/Makefile<br/>deleted file mode 100644<br/>index 9f6bd845a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/newt/Makefile?h=15.50&amp;id=f8b5c22e2584741f2c522ffc86486bc073f943ce'>mdk-stage1/newt/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'>- # Guillaume Cottenceau (gc)</div><div class='del'>- #</div><div class='del'>- # Copyright 2000 Mandriva</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'>-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'>-$(LIBNAME).a: $(OBJS)</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'>-	$(DIET) gcc $(CFLAGS) $(DEFS) $(INCS) $(INCLUDES) -c $&lt; -o $@</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 d7da58175..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/newt/button.c?h=15.50&amp;id=f8b5c22e2584741f2c522ffc86486bc073f943ce'>mdk-stage1/newt/button.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,192 +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'>-    er.result = ER_IGNORED;</div><div class='del'>-    er.u.focus = NULL;</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=15.50&amp;id=f8b5c22e2584741f2c522ffc86486bc073f943ce'>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 643609d34..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/newt/checkbox.c?h=15.50&amp;id=f8b5c22e2584741f2c522ffc86486bc073f943ce'>mdk-stage1/newt/checkbox.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,292 +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'>-    er.result = ER_IGNORED;</div><div class='del'>-    er.u.focus = NULL;</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=15.50&amp;id=f8b5c22e2584741f2c522ffc86486bc073f943ce'>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 0ee449cf9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/newt/entry.c?h=15.50&amp;id=f8b5c22e2584741f2c522ffc86486bc073f943ce'>mdk-stage1/newt/entry.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,378 +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'>-    er.result = ER_IGNORED;</div><div class='del'>-    er.u.focus = NULL;</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 ad7520e95..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/newt/form.c?h=15.50&amp;id=f8b5c22e2584741f2c522ffc86486bc073f943ce'>mdk-stage1/newt/form.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,713 +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;string.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=15.50&amp;id=f8b5c22e2584741f2c522ffc86486bc073f943ce'>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=15.50&amp;id=f8b5c22e2584741f2c522ffc86486bc073f943ce'>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 0048c3782..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/newt/listbox.c?h=15.50&amp;id=f8b5c22e2584741f2c522ffc86486bc073f943ce'>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'>