[Libvir] [PATCH] Remove curses, don't require readline

This patch removes checking for curses/ncurses. It is never used. It also allows libvirt to be compiled without readline support. If readline support is not available then the only difference is that 'virsh' will be built without it -- in other words, command line editing will not work in virsh. Rich. -- Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/ Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 03798903

On Tue, Dec 04, 2007 at 05:39:17PM +0000, Richard W.M. Jones wrote:
This patch removes checking for curses/ncurses. It is never used.
It also allows libvirt to be compiled without readline support. If readline support is not available then the only difference is that 'virsh' will be built without it -- in other words, command line editing will not work in virsh.
ACK, seems reasonable to me. Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|

On Tue, Dec 04, 2007 at 05:39:17PM +0000, Richard W.M. Jones wrote:
This patch removes checking for curses/ncurses. It is never used.
It also allows libvirt to be compiled without readline support. If readline support is not available then the only difference is that 'virsh' will be built without it -- in other words, command line editing will not work in virsh.
Makes sense, [...]
+static char * +vshReadline (vshControl *ctl, const char *prompt) +{ + char line[1024]; + char *r; + int len; + + fputs (prompt, stdout); + r = fgets (line, sizeof line, stdin);
shouldn't we use parenthesis i.e. sizeof(line)
+ if (r == NULL) return NULL; /* EOF */ +
Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

Daniel Veillard <veillard@redhat.com> wrote:
On Tue, Dec 04, 2007 at 05:39:17PM +0000, Richard W.M. Jones wrote:
This patch removes checking for curses/ncurses. It is never used.
It also allows libvirt to be compiled without readline support. If readline support is not available then the only difference is that 'virsh' will be built without it -- in other words, command line editing will not work in virsh.
Makes sense,
[...]
+static char * +vshReadline (vshControl *ctl, const char *prompt) +{ + char line[1024]; + char *r; + int len; + + fputs (prompt, stdout); + r = fgets (line, sizeof line, stdin);
shouldn't we use parenthesis i.e. sizeof(line)
Either works just fine for variable names and simple expressions. It's a question of style. I like to avoid the extra parens, when possible.
participants (4)
-
Daniel P. Berrange
-
Daniel Veillard
-
Jim Meyering
-
Richard W.M. Jones