<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rc/hash.c, branch master</title>
<subtitle>Byron Rakitzis' rc(1) port, with a few modifications
</subtitle>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/'/>
<entry>
<title>very minor cleanups</title>
<updated>2018-05-30T20:50:52+00:00</updated>
<author>
<name>Toby Goodwin</name>
<email>toby@paganbooks.eu</email>
</author>
<published>2018-05-30T20:50:52+00:00</published>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/commit/?id=668096b6d336128d6828b0e0bf214e2a228d7026'/>
<id>668096b6d336128d6828b0e0bf214e2a228d7026</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Completion of command names and variables</title>
<updated>2018-04-26T05:52:32+00:00</updated>
<author>
<name>Bert Münnich</name>
<email>ber.t@posteo.de</email>
</author>
<published>2015-12-05T16:34:49+00:00</published>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/commit/?id=68fc1605e7d3a317477abf1afc6410581724b72d'/>
<id>68fc1605e7d3a317477abf1afc6410581724b72d</id>
<content type='text'>
New completion entry functions for readline specific code:
  - compl_var for variables
  - compl_fn for functions
  - compl_builtin for builtins
  - compl_extcmd for external commands in path
  - compl_command, which combines the last three

The first three are simple wrappers for compl_name, which iterates over a
typical rc table (an array of structs) yielding the name fields.

The appropriate completion entry function is chosen based on the
character/token that preceeds the word to complete: '$' for variable,
beginning of line or one of [`@|&amp;(){;] for command. Otherwise the shell falls
back to readline's default completion, which it also does, if the chosen
completion entry function finds no match.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
New completion entry functions for readline specific code:
  - compl_var for variables
  - compl_fn for functions
  - compl_builtin for builtins
  - compl_extcmd for external commands in path
  - compl_command, which combines the last three

The first three are simple wrappers for compl_name, which iterates over a
typical rc table (an array of structs) yielding the name fields.

The appropriate completion entry function is chosen based on the
character/token that preceeds the word to complete: '$' for variable,
beginning of line or one of [`@|&amp;(){;] for command. Otherwise the shell falls
back to readline's default completion, which it also does, if the chosen
completion entry function finds no match.
</pre>
</div>
</content>
</entry>
<entry>
<title>When running rc on the following script, rc crashes.</title>
<updated>2017-05-26T21:12:26+00:00</updated>
<author>
<name>Drazen Borkovic</name>
<email>borkovic@users.noreply.github.com</email>
</author>
<published>2015-10-27T05:22:54+00:00</published>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/commit/?id=d8946406165ccfc458ff418aec465d67fa61ec1e'/>
<id>d8946406165ccfc458ff418aec465d67fa61ec1e</id>
<content type='text'>
    fn f1 { v=x {  }}
    fn f2 { f1  1;  f1  2 }
    f2
    whatis

Valgrind stack:
    ==10068== Invalid read of size 8
    ==10068==    at 0x40EFB1: varlookup (var.c:84)
    ==10068==    by 0x407B04: whatare_all_vars (hash.c:311)
    ==10068==    by 0x401E60: b_whatis (builtins.c:323)
    ==10068==    by 0x402E32: exec (exec.c:92)
    ==10068==    by 0x40F997: walk (walk.c:39)

The reason is that vp[h].p is freed in delete_var(), but the pointer is kept.
Later the pointer is found to be non-null and dereferenced causing the crash.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
    fn f1 { v=x {  }}
    fn f2 { f1  1;  f1  2 }
    f2
    whatis

Valgrind stack:
    ==10068== Invalid read of size 8
    ==10068==    at 0x40EFB1: varlookup (var.c:84)
    ==10068==    by 0x407B04: whatare_all_vars (hash.c:311)
    ==10068==    by 0x401E60: b_whatis (builtins.c:323)
    ==10068==    by 0x402E32: exec (exec.c:92)
    ==10068==    by 0x40F997: walk (walk.c:39)

The reason is that vp[h].p is freed in delete_var(), but the pointer is kept.
Later the pointer is found to be non-null and dereferenced causing the crash.
</pre>
</div>
</content>
</entry>
<entry>
<title>snapshot from cvs: 2005-03-03</title>
<updated>2015-05-16T20:23:24+00:00</updated>
<author>
<name>Toby Goodwin</name>
<email>toby@paccrat.org</email>
</author>
<published>2015-05-15T18:36:55+00:00</published>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/commit/?id=27c900d6ae9cd0dcf4bc97bc9b8c1882e40ccfa8'/>
<id>27c900d6ae9cd0dcf4bc97bc9b8c1882e40ccfa8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>  Feature: make $version less magical, and exportable if it's changed</title>
<updated>2015-05-16T20:23:21+00:00</updated>
<author>
<name>tjg</name>
<email>tjg</email>
</author>
<published>2002-04-04T10:07:58+00:00</published>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/commit/?id=f438af241d1a85f9d6d7b3cd214eb3f11a972e0b'/>
<id>f438af241d1a85f9d6d7b3cd214eb3f11a972e0b</id>
<content type='text'>
  from its default value.  Same for $prompt.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  from its default value.  Same for $prompt.
</pre>
</div>
</content>
</entry>
<entry>
<title>  Feature: make $version less magical, and exportable.</title>
<updated>2015-05-16T20:23:21+00:00</updated>
<author>
<name>tjg</name>
<email>tjg</email>
</author>
<published>2002-04-03T14:57:21+00:00</published>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/commit/?id=5ebf72443b04d110e41c9f2f9dbc6a9796862e38'/>
<id>5ebf72443b04d110e41c9f2f9dbc6a9796862e38</id>
<content type='text'>
  Bug: make $bqstatus and $status not exportable.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  Bug: make $bqstatus and $status not exportable.
</pre>
</div>
</content>
</entry>
<entry>
<title>  Feature: don't export $cdpath or $home (the lower-case versions).</title>
<updated>2015-05-16T20:23:20+00:00</updated>
<author>
<name>tjg</name>
<email>tjg</email>
</author>
<published>2001-10-12T09:29:49+00:00</published>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/commit/?id=0d3f5de9280d8854871efd8a99d1590ea768e350'/>
<id>0d3f5de9280d8854871efd8a99d1590ea768e350</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>  Portability: exporting `path' causes indigestion in CygWin.  Since</title>
<updated>2015-05-16T20:23:16+00:00</updated>
<author>
<name>tjg</name>
<email>tjg</email>
</author>
<published>1999-10-14T09:56:21+00:00</published>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/commit/?id=a7041ce4c119f290c4dc9f6a002966608c5d8827'/>
<id>a7041ce4c119f290c4dc9f6a002966608c5d8827</id>
<content type='text'>
  it's virtually impossible for a child `rc' process to inherit `path'
  (which I consider a bug, but it's not going to be fixed now), simply
  don't export `path'.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  it's virtually impossible for a child `rc' process to inherit `path'
  (which I consider a bug, but it's not going to be fixed now), simply
  don't export `path'.
</pre>
</div>
</content>
</entry>
<entry>
<title>  Feature: replace `-V' with `version' variable.</title>
<updated>2015-05-16T20:23:16+00:00</updated>
<author>
<name>tjg</name>
<email>tjg</email>
</author>
<published>1999-10-13T16:29:06+00:00</published>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/commit/?id=c3ebbbf35d712613024488098645f432160f9e26'/>
<id>c3ebbbf35d712613024488098645f432160f9e26</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>better integration with readline</title>
<updated>2015-05-16T20:23:06+00:00</updated>
<author>
<name>tgoodwin</name>
<email>tgoodwin</email>
</author>
<published>1998-07-08T16:58:00+00:00</published>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/commit/?id=92f004d552441f0ff1fdc1e802520422117f0444'/>
<id>92f004d552441f0ff1fdc1e802520422117f0444</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
