<feed xmlns='http://www.w3.org/2005/Atom'>
<title>talos-op-linux/scripts/kconfig/nconf.gui.c, branch v4.2.2</title>
<subtitle>Talos™ II Linux sources for OpenPOWER</subtitle>
<id>https://git.raptorcs.com/git/talos-op-linux/atom?h=v4.2.2</id>
<link rel='self' href='https://git.raptorcs.com/git/talos-op-linux/atom?h=v4.2.2'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/'/>
<updated>2013-06-18T21:58:58+00:00</updated>
<entry>
<title>nconf: use function calls instead of ncurses' variables LINES and COLS</title>
<updated>2013-06-18T21:58:58+00:00</updated>
<author>
<name>Dirk Gouders</name>
<email>dirk@gouders.net</email>
</author>
<published>2013-05-13T09:23:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=e0b42605e685a0833303e1d4dde277c99d9e17b5'/>
<id>urn:sha1:e0b42605e685a0833303e1d4dde277c99d9e17b5</id>
<content type='text'>
According to the documentation [1], LINES and COLS are initialized by
initscr(); it does not say anything about the behavior when windows are
resized.

Do not rely on the current implementation of ncurses that updates
these variables on resize, but use the propper function calls or macros
to get window dimensions.

The use of the variables in main() was OK, but for the sake of
consistency it was modified to use the macro getmaxyx().

[1] ncurses(3X)

Signed-off-by: Dirk Gouders &lt;dirk@gouders.net&gt;
Reviewed-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
[yann.morin.1998@free.fr: declare 'lines' and 'columns' on a single line]
Signed-off-by: Yann E. MORIN &lt;yann.morin.1998@free.fr&gt;
</content>
</entry>
<entry>
<title>nconf: function keys line, change background color for better readability</title>
<updated>2013-01-24T10:43:44+00:00</updated>
<author>
<name>Roland Eggner</name>
<email>edvx1@systemanalysen.net</email>
</author>
<published>2012-12-29T22:33:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=c5ffa130f3644b51e588a2a6770648b6ea936969'/>
<id>urn:sha1:c5ffa130f3644b51e588a2a6770648b6ea936969</id>
<content type='text'>
•  In function keys line descriptions black on darkblue are almost
   impossible to read.  Change colors to black on brown.

Signed-off-by: Roland Eggner &lt;edvx1@systemanalysen.net&gt;
Tested-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Signed-off-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
</content>
</entry>
<entry>
<title>nconf: add u, d command keys in scroll windows</title>
<updated>2012-07-26T10:20:46+00:00</updated>
<author>
<name>Benjamin Poirier</name>
<email>bpoirier@suse.de</email>
</author>
<published>2012-07-24T20:12:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=d68e818bc4d5c962093ced51c4d8341fc6aea30d'/>
<id>urn:sha1:d68e818bc4d5c962093ced51c4d8341fc6aea30d</id>
<content type='text'>
They function just like they do in less(1).
Also correct some discrepancy between the help text and the code wrt
function keys.

Signed-off-by: Benjamin Poirier &lt;bpoirier@suse.de&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</content>
</entry>
<entry>
<title>scripts/kconfig/nconf: add KEY_HOME / KEY_END for dialog_inputbox</title>
<updated>2011-09-09T12:40:08+00:00</updated>
<author>
<name>Cheng Renquan</name>
<email>crquan@gmail.com</email>
</author>
<published>2011-09-01T17:52:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=93072c3ecafcf188390750cc755185f3150736b9'/>
<id>urn:sha1:93072c3ecafcf188390750cc755185f3150736b9</id>
<content type='text'>
to make it easier to locate begin/end when editing long strings;

Signed-off-by: Cheng Renquan &lt;crquan@gmail.com&gt;
Acked By: Nir Tzachar &lt;nir.tzachar@gmail.com&gt;
</content>
</entry>
<entry>
<title>scripts/kconfig/nconf: fix editing long strings</title>
<updated>2011-09-09T12:40:08+00:00</updated>
<author>
<name>Cheng Renquan</name>
<email>crquan@gmail.com</email>
</author>
<published>2011-09-01T17:52:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=e631a57a19e103c3bb59495b236634ec62e2a850'/>
<id>urn:sha1:e631a57a19e103c3bb59495b236634ec62e2a850</id>
<content type='text'>
The original dialog_inputbox doesn't work with longer than prompt_width
strings, here fixed it in this way:
1) add variable cursor_form_win to record cursor of form_win,
   keep its value always between [0, prompt_width-1];
   reuse the original cursor_position as cursor of the string result,
   use (cursor_position-cursor_form_win) as begin offset to show part of
   the string in form_win;

Signed-off-by: Cheng Renquan &lt;crquan@gmail.com&gt;
Cc: Arnaud Lacombe &lt;lacombar@gmail.com&gt;
Cc: Nir Tzachar &lt;nir.tzachar@gmail.com&gt;
</content>
</entry>
<entry>
<title>scripts/kconfig/nconf: dynamically alloc dialog_input_result</title>
<updated>2011-09-09T12:40:08+00:00</updated>
<author>
<name>Cheng Renquan</name>
<email>crquan@gmail.com</email>
</author>
<published>2011-09-01T17:52:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=5ea9f64ffc073bf2882f6aa83b0dad3609b1e67a'/>
<id>urn:sha1:5ea9f64ffc073bf2882f6aa83b0dad3609b1e67a</id>
<content type='text'>
To support unlimited length string config items;

No check for realloc return value keeps code simple, and to be
consistent with other existing unchecked malloc in kconfig.

Signed-off-by: Cheng Renquan &lt;crquan@gmail.com&gt;
Signed-off-by: Arnaud Lacombe &lt;lacombar@gmail.com&gt;
</content>
</entry>
<entry>
<title>scripts/kconfig/nconf: fix memmove's length arg</title>
<updated>2011-09-09T12:40:08+00:00</updated>
<author>
<name>Cheng Renquan</name>
<email>crquan@gmail.com</email>
</author>
<published>2011-09-01T17:52:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=cd58a90fa6ff2ec86bcc9e399acfd6dcc97268b3'/>
<id>urn:sha1:cd58a90fa6ff2ec86bcc9e399acfd6dcc97268b3</id>
<content type='text'>
In case KEY_BACKSPACE / KEY_DC to delete a char, it memmove only
(len-cursor_position+1) bytes;
the default case is to insert a char, it should also memmove exactly
(len-cursor_position+1) bytes;

the original use of (len+1) is wrong and may access following memory
that doesn't belong to result, may cause SegFault in theory;

	case KEY_BACKSPACE:
		if (cursor_position &gt; 0) {
			memmove(&amp;result[cursor_position-1],
					&amp;result[cursor_position],
					len-cursor_position+1);
			cursor_position--;
		}
		break;
	case KEY_DC:
		if (cursor_position &gt;= 0 &amp;&amp; cursor_position &lt; len) {
			memmove(&amp;result[cursor_position],
					&amp;result[cursor_position+1],
					len-cursor_position+1);
		}
		break;
	default:
		if ((isgraph(res) || isspace(res)) &amp;&amp;
				len-2 &lt; result_len) {
			/* insert the char at the proper position */
			memmove(&amp;result[cursor_position+1],
					&amp;result[cursor_position],
					len-cursor_position+1);
			result[cursor_position] = res;
			cursor_position++;
		}

Signed-off-by: Cheng Renquan &lt;crquan@gmail.com&gt;
Acked-by: Nir Tzachar &lt;nir.tzachar@gmail.com&gt;
</content>
</entry>
<entry>
<title>scripts/kconfig/nconf: fix typo: unknow =&gt; unknown</title>
<updated>2011-09-09T12:40:08+00:00</updated>
<author>
<name>Cheng Renquan</name>
<email>crquan@gmail.com</email>
</author>
<published>2011-09-01T17:52:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=4e24dbfc26f8b8285c9ed2f92ffddf4eb8ab960a'/>
<id>urn:sha1:4e24dbfc26f8b8285c9ed2f92ffddf4eb8ab960a</id>
<content type='text'>
Signed-off-by: Cheng Renquan &lt;crquan@gmail.com&gt;
Acked-by: Arnaud Lacombe &lt;lacombar@gmail.com&gt;
</content>
</entry>
<entry>
<title>kbuild: fix typo</title>
<updated>2010-08-17T09:00:43+00:00</updated>
<author>
<name>Arnaud Lacombe</name>
<email>lacombar@gmail.com</email>
</author>
<published>2010-08-16T04:19:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=c24035b9edad6164ddc12e88444acea741d5e309'/>
<id>urn:sha1:c24035b9edad6164ddc12e88444acea741d5e309</id>
<content type='text'>
Signed-off-by: Arnaud Lacombe &lt;lacombar@gmail.com&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</content>
</entry>
<entry>
<title>nconfig: add search support</title>
<updated>2010-08-16T20:04:55+00:00</updated>
<author>
<name>Nir Tzachar</name>
<email>nir.tzachar@gmail.com</email>
</author>
<published>2010-08-08T13:50:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=a72f3e2b82eb26f43bed1f83beeeb47830918811'/>
<id>urn:sha1:a72f3e2b82eb26f43bed1f83beeeb47830918811</id>
<content type='text'>
Remove the old hotkeys feature, and replace it by an interactive string
search.
From nconfig help:

Searching: pressing '/' triggers interactive search mode.
           nconfig performs a case insensitive search for the string
           in the menu prompts (no regex support).
           Pressing the up/down keys highlights the previous/next
           matching item. Backspace removes one character from the
           match string. Pressing either '/' again or ESC exits
           search mode. All other keys behave normally.

Miscellaneous other changes (including Rundy's and Justin's input).

Signed-off-by: Nir Tzachar &lt;nir.tzachar@gmail.com&gt;
Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</content>
</entry>
</feed>
