-miniexpect is a very simple expect-like library for C.
+miniexpect is a very simple expect-like library
It has a saner interface than libexpect, and doesn't depend on Tcl.
It is also thread safe, const-correct and uses modern C standards.
=head1 NAME
-miniexpect - A very simple expect library for C.
+miniexpect - A very simple expect library
=head1 SYNOPSIS
{ 0 },
}, match_data)) {
case 100:
- /* here you would send a password */
+ /* server printed a password prompt, so send a password */
+ mexp_printf_password (h, "%s", password);
break;
case 101:
- /* here you would send a command */
+ /* server sent a shell prompt, send a command */
+ mexp_printf (h, "ls\n");
break;
case MEXP_EOF:
fprintf (stderr, "error: ssh closed the connection unexpectedly\n");