Home | History | Annotate | Download | only in ksh

Lines Matching defs:shf

1 /*	$NetBSD: shf.h,v 1.3 1999/10/20 15:10:00 hubertf Exp $	*/
9 /* $Id: shf.h,v 1.3 1999/10/20 15:10:00 hubertf Exp $ */
13 #define shf_fileno(shf) ((shf)->fd)
14 #define shf_setfileno(shf,nfd) ((shf)->fd = (nfd))
15 #define shf_getc(shf) ((shf)->rnleft > 0 ? (shf)->rnleft--, *(shf)->rp++ : \
16 shf_getchar(shf))
17 #define shf_putc(c, shf) ((shf)->wnleft == 0 ? shf_putchar((c), (shf)) \
18 : ((shf)->wnleft--, *(shf)->wp++ = (c)))
19 #define shf_eof(shf) ((shf)->flags & SHF_EOF)
20 #define shf_error(shf) ((shf)->flags & SHF_ERROR)
21 #define shf_errno(shf) ((shf)->errno_)
22 #define shf_clearerr(shf) ((shf)->flags &= ~(SHF_EOF | SHF_ERROR))
38 #define SHF_ALLOCS 0x0200 /* shf and shf->buf were alloc()ed */
39 #define SHF_ALLOCB 0x0400 /* shf->buf was alloc()ed */
46 struct shf {
58 Area *areap; /* area shf/buf were allocated in */
61 extern struct shf shf_iob[];
63 struct shf *shf_open ARGS((const char *name, int oflags, int mode,
65 struct shf *shf_fdopen ARGS((int fd, int sflags, struct shf *shf));
66 struct shf *shf_reopen ARGS((int fd, int sflags, struct shf *shf));
67 struct shf *shf_sopen ARGS((char *buf, int bsize, int sflags,
68 struct shf *shf));
69 int shf_close ARGS((struct shf *shf));
70 int shf_fdclose ARGS((struct shf *shf));
71 char *shf_sclose ARGS((struct shf *shf));
72 int shf_finish ARGS((struct shf *shf));
73 int shf_flush ARGS((struct shf *shf));
74 int shf_seek ARGS((struct shf *shf, off_t where, int from));
75 int shf_read ARGS((char *buf, int bsize, struct shf *shf));
76 char *shf_getse ARGS((char *buf, int bsize, struct shf *shf));
77 int shf_getchar ARGS((struct shf *shf));
78 int shf_ungetc ARGS((int c, struct shf *shf));
79 int shf_putchar ARGS((int c, struct shf *shf));
80 int shf_puts ARGS((const char *s, struct shf *shf));
81 int shf_write ARGS((const char *buf, int nbytes, struct shf *shf));
82 int shf_fprintf ARGS((struct shf *shf, const char *fmt, ...));
85 int shf_vfprintf ARGS((struct shf *, const char *fmt, va_list args));