Lines Matching +full:blocking +full:- +full:io
2 * Copyright (c) 2000-2002, 2004, 2013 Proofpoint, Inc. and its suppliers.
14 * $Id: io.h,v 1.26 2013-11-22 20:51:31 ca Exp $
17 /*-
28 /* mode for sm io (exposed) */
29 #define SM_IO_RDWR 1 /* read-write */
30 #define SM_IO_RDONLY 2 /* read-only */
31 #define SM_IO_WRONLY 3 /* write-only */
32 #define SM_IO_APPEND 4 /* write-only from eof */
33 #define SM_IO_APPENDRW 5 /* read-write from eof */
34 #define SM_IO_RDWRTR 6 /* read-write with truncation indicated */
84 ** lbfsize is -bf.size, else lbfsize is 0
93 ** lbfsize is used only to make the inline line-buffered output stream
99 ** ub.base becomes non-nil (i.e., a stream has ungetc() data iff
112 short f_file; /* fileno, if Unix fd, else -1 */
114 int f_lbfsize; /* 0 or -bf.size, for inline putc */
130 int f_timeoutstate; /* either blocking or non-blocking */
131 char *f_type; /* for by-type lookups */
182 (f) = {SmFileMagic, (unsigned char *) 0, 0, 0, 0L, -1, {0}, 0, (void *) 0,\
239 #define SM_TIME_FOREVER (-1)
240 #define SM_TIME_DEFAULT (-2)
242 /* timeout state for blocking */
261 #define SM_IO_EOF (-1)
355 (--(f)->f_r < 0 ? \
357 (int)(*(f)->f_p++))
365 (--(f)->f_w < 0 ? \
366 (f)->f_w >= (f)->f_lbfsize ? \
367 (*(f)->f_p = (c)), *(f)->f_p != '\n' ? \
368 (int)*(f)->f_p++ : \
371 (*(f)->f_p = (c), (int)*(f)->f_p++))
373 #define sm_eof(p) (((p)->f_flags & SMFEOF) != 0)
374 #define sm_error(p) (((p)->f_flags & SMERR) != 0)
375 #define sm_clearerr(p) ((void)((p)->f_flags &= ~(SMERR|SMFEOF)))