Example: TE_sperror

In the following example, TE_sperror sends an error string to the output.txt file, using the lr_log_message function, if the desired text (the Kermit prompt) does not appear.

TE_wait_text("C-Kermit>",TIMEOUT);
if (TE_errno)
    lr_log_message( "Waiting for prompt failed: %s\n", TE_sperror() );
lr_log_message( "%s: %s\n", prefix, TE_sperror() );
TE_type("statistics<kReturn>");