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