| iMatix home page
| << | < | > | >>
SMT Logo SMT
Version 2.81

 

lazy_read

#include "smtlib.h"
int
lazy_read (int handle, char *buffer, size_t count)

Synopsis

Calls the standard read() function without blocking. Returns the number of bytes read when the call succeeds, else returns - 1 and sets errno to the cause of the error. If the call would block, returns -1, sets errno to EAGAIN, and calls recycle module() to re-execute the current dialog module automatically. You can override this behavious by calling recycle module (FALSE) after the return. Sets the global variable "io_completed" to TRUE if the i/o access completed, with or without an error.

Source Code - (smtlib.c)

{
    int rc;

#if (defined (SMT_TRACE))
    trace ("lazy_read: handle=%d bytes=%d", handle, count);
#endif
    rc = read (handle, buffer, count);
    set_io_completed (rc);
    return (rc);
}

| << | < | > | >> iMatix Copyright © 1996-99 iMatix Corporation