|
Postfix3.3.1
|
#include <sys_defs.h>#include <stdlib.h>#include <stdarg.h>#include <stddef.h>#include <unistd.h>#include <fcntl.h>#include <time.h>#include <errno.h>#include <string.h>#include "mymalloc.h"#include "msg.h"#include "vbuf_print.h"#include "iostuff.h"#include "vstring.h"#include "vstream.h"マクロ定義 | |
| #define | VSTREAM_STATIC(v) ((v) >= VSTREAM_IN && (v) <= VSTREAM_ERR) |
| #define | VSTREAM_ACC_MASK(f) ((f) & (O_APPEND | O_WRONLY | O_RDWR)) |
| #define | VSTREAM_CAN_READ(f) |
| #define | VSTREAM_CAN_WRITE(f) |
| #define | VSTREAM_BUF_COUNT(bp, n) ((bp)->flags & VSTREAM_FLAG_READ ? -(n) : (n)) |
| #define | VSTREAM_BUF_AT_START(bp) |
| #define | VSTREAM_BUF_AT_OFFSET(bp, offset) |
| #define | VSTREAM_BUF_AT_END(bp) |
| #define | VSTREAM_BUF_ZERO(bp) |
| #define | VSTREAM_BUF_ACTIONS(bp, get_action, put_action, space_action) |
| #define | VSTREAM_SAVE_STATE(stream, buffer, filedes) |
| #define | VSTREAM_RESTORE_STATE(stream, buffer, filedes) |
| #define | VSTREAM_FORK_STATE(stream, buffer, filedes) |
| #define | VSTREAM_FLAG_READ_DOUBLE (VSTREAM_FLAG_READ | VSTREAM_FLAG_DOUBLE) |
| #define | VSTREAM_FLAG_WRITE_DOUBLE (VSTREAM_FLAG_WRITE | VSTREAM_FLAG_DOUBLE) |
| #define | VSTREAM_FFLUSH_SOME(stream) vstream_fflush_some((stream), (stream)->buf.len - (stream)->buf.cnt) |
| #define | VSTREAM_SUB_TIME(x, y, z) |
| #define | VSTREAM_TRUNCATE(count, base) (((count) / (base)) * (base)) |
| #define | VSTREAM_ROUNDUP(count, base) VSTREAM_TRUNCATE(count + base - 1, base) |
| #define | VSTREAM_MAYBE_PURGE_WRITE(d, b) |
| #define | VSTREAM_MAYBE_PURGE_READ(d, b) |
| #define | SWAP(type, a, b) do { type temp = (a); (a) = (b); (b) = (temp); } while (0) |
関数 | |
| int | vstream_fpurge (VSTREAM *stream, int direction) |
| off_t | vstream_fseek (VSTREAM *stream, off_t offset, int whence) |
| off_t | vstream_ftell (VSTREAM *stream) |
| VSTREAM * | vstream_fdopen (int fd, int flags) |
| VSTREAM * | vstream_fopen (const char *path, int flags, mode_t mode) |
| int | vstream_fflush (VSTREAM *stream) |
| int | vstream_fclose (VSTREAM *stream) |
| int | vstream_fdclose (VSTREAM *stream) |
| VSTREAM * | vstream_printf (const char *fmt,...) |
| VSTREAM * | vstream_fprintf (VSTREAM *stream, const char *fmt,...) |
| int | vstream_fputs (const char *str, VSTREAM *stream) |
| void | vstream_control (VSTREAM *stream, int name,...) |
| VSTREAM * | vstream_vprintf (const char *format, va_list ap) |
| VSTREAM * | vstream_vfprintf (VSTREAM *vp, const char *format, va_list ap) |
| ssize_t | vstream_bufstat (VSTREAM *vp, int command) |
| ssize_t | vstream_peek (VSTREAM *vp) |
| const char * | vstream_peek_data (VSTREAM *vp) |
変数 | |
| VSTREAM | vstream_fstd [] |
| #define SWAP | ( | type, | |
| a, | |||
| b | |||
| ) | do { type temp = (a); (a) = (b); (b) = (temp); } while (0) |
| #define VSTREAM_BUF_ACTIONS | ( | bp, | |
| get_action, | |||
| put_action, | |||
| space_action | |||
| ) |
| #define VSTREAM_BUF_AT_END | ( | bp | ) |
| #define VSTREAM_BUF_AT_OFFSET | ( | bp, | |
| offset | |||
| ) |
| #define VSTREAM_BUF_AT_START | ( | bp | ) |
| #define VSTREAM_BUF_COUNT | ( | bp, | |
| n | |||
| ) | ((bp)->flags & VSTREAM_FLAG_READ ? -(n) : (n)) |
| #define VSTREAM_BUF_ZERO | ( | bp | ) |
| #define VSTREAM_CAN_READ | ( | f | ) |
| #define VSTREAM_CAN_WRITE | ( | f | ) |
| #define VSTREAM_FFLUSH_SOME | ( | stream | ) | vstream_fflush_some((stream), (stream)->buf.len - (stream)->buf.cnt) |
| #define VSTREAM_FLAG_READ_DOUBLE (VSTREAM_FLAG_READ | VSTREAM_FLAG_DOUBLE) |
| #define VSTREAM_FLAG_WRITE_DOUBLE (VSTREAM_FLAG_WRITE | VSTREAM_FLAG_DOUBLE) |
| #define VSTREAM_FORK_STATE | ( | stream, | |
| buffer, | |||
| filedes | |||
| ) |
| #define VSTREAM_MAYBE_PURGE_READ | ( | d, | |
| b | |||
| ) |
| #define VSTREAM_MAYBE_PURGE_WRITE | ( | d, | |
| b | |||
| ) |
| #define VSTREAM_RESTORE_STATE | ( | stream, | |
| buffer, | |||
| filedes | |||
| ) |
| #define VSTREAM_ROUNDUP | ( | count, | |
| base | |||
| ) | VSTREAM_TRUNCATE(count + base - 1, base) |
| #define VSTREAM_SAVE_STATE | ( | stream, | |
| buffer, | |||
| filedes | |||
| ) |
| #define VSTREAM_STATIC | ( | v | ) | ((v) >= VSTREAM_IN && (v) <= VSTREAM_ERR) |
| #define VSTREAM_SUB_TIME | ( | x, | |
| y, | |||
| z | |||
| ) |
| #define VSTREAM_TRUNCATE | ( | count, | |
| base | |||
| ) | (((count) / (base)) * (base)) |
| VSTREAM vstream_fstd[] |
1.8.9.1