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

 

lazy_open_text

#include "smtlib.h"
int
lazy_open_text (char *path, int flags)

Synopsis

As lazy open(), but opens the file in text mode, on those platforms where this makes a difference.

Examples

    handle_input  = lazy_open (filename, O_RDONLY);
    handle_output = lazy_open (filename, O_WRONLY | O_CREAT | O_TRUNC);
    handle_append = lazy_open (filename, O_WRONLY | O_CREAT | O_APPEND);
    if (io_completed && handle < 0)
        have error on file

Source Code - (smtlib.c)

{
    int rc;

#if (defined (SMT_TRACE))
    trace ("lazy_open_text: path=%s", path);
#endif
    rc = open (path, flags | O_NONBLOCK, S_IREAD | S_IWRITE);
    set_io_completed (rc);
    return (rc);
}

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