[kbd] New vt_mode tool for kbd?

Dmitry V. Levin ldv at altlinux.org
Tue Mar 29 21:51:39 UTC 2011


On Tue, Mar 29, 2011 at 01:07:28AM +0400, Alexey Gladkov wrote:
> 28.03.2011 15:19, Dmitry V. Levin wrote:
> > This interface would be both script-friendly and extensible.
> 
> Ok. Another implementation. How about this ?

Fine with me.

> static int
> answer(char *ans) {

I'd change this and some others "char *" to "const char *", but it's not
important.

> 		return !strcasecmp(value, ans) ? EXIT_SUCCESS : EXIT_FAILURE;

I'd code it a bit differently:
		return strcasecmp(value, ans) ? EXIT_FAILURE : EXIT_SUCCESS;


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.altlinux.org/pipermail/kbd/attachments/20110330/8b693363/attachment.bin>


More information about the kbd mailing list