client/src/unifycr.c
inline int unifycr_intercept_stream(FILE* stream)
{
    /* don't intecept anything until we're initialized */
    if (! unifycr_initialized) {
        return 0;
    }

    /* check whether this pointer lies within range of our
     * file stream array */
    unifycr_stream_t* ptr   = (unifycr_stream_t*) stream;
    unifycr_stream_t* start = &(unifycr_streams[0]);
    unifycr_stream_t* end   = &(unifycr_streams[UNIFYCR_MAX_FILEDESCS]);
    if (ptr >= start && ptr < end) {
        return 1;
    }

    return 0;
}
/* given an fd, return 1 if we should intercept this file, 0 otherwise,
 * convert fd to new fd value if needed */
given an fd, return 1 if we should intercept this file, 0 otherwise,
convert fd to new fd value if needed
given an fd return 1 if we should intercept this file 0 otherwise convert fd to new fd value if needed
inline int unifycr_intercept_stream(FILE* stream)
{
    if (! unifycr_initialized) {
        return 0;
    }
    unifycr_stream_t* ptr   = (unifycr_stream_t*) stream;
    unifycr_stream_t* start = &(unifycr_streams[0]);
    unifycr_stream_t* end   = &(unifycr_streams[UNIFYCR_MAX_FILEDESCS]);
    if (ptr >= start && ptr < end) {
        return 1;
    }
    return 0;
}
inline int unifycr_intercept_stream ( FILE * stream ) { if ( ! unifycr_initialized ) { return 0 ; } unifycr_stream_t * ptr = ( unifycr_stream_t * ) stream ; unifycr_stream_t * start = & ( unifycr_streams [ 0 ] ) ; unifycr_stream_t * end = & ( unifycr_streams [ UNIFYCR_MAX_FILEDESCS ] ) ; if ( ptr >= start && ptr < end ) { return 1 ; } return 0 ; }
given an fd, return 1 if we should intercept this file, 0 otherwise,
 convert fd to new fd value if needed
given an fd return 1 if we should intercept this file 0 otherwise convert fd to new fd value if needed
/* don't intecept anything until we're initialized */ /* check whether this pointer lies within range of our
     * file stream array */