Lines Matching refs:shf

2 /*	$OpenBSD: shf.h,v 1.6 2005/12/11 18:53:51 deraadt Exp $	*/
289 /* see the large comment in shf.c for an EBCDIC primer */
988 EXTERN const char Tbad_bsize[] E_INIT("bad shf/buf/bsize");
1154 #define Tbad_bsize "bad shf/buf/bsize"
1317 struct shf *shf;
1694 #define shf_fileno(shf) ((shf)->fd)
1695 #define shf_setfileno(shf,nfd) ((shf)->fd = (nfd))
1696 #define shf_getc_i(shf) ((shf)->rnleft > 0 ? \
1697 (shf)->rnleft--, (int)ord(*(shf)->rp++) : \
1698 shf_getchar(shf))
1699 #define shf_putc_i(c,shf) ((shf)->wnleft == 0 ? \
1700 shf_putchar((uint8_t)(c), (shf)) : \
1701 ((shf)->wnleft--, *(shf)->wp++ = (c)))
1702 #define shf_eof(shf) ((shf)->flags & SHF_EOF)
1703 #define shf_error(shf) ((shf)->flags & SHF_ERROR)
1704 #define shf_errno(shf) ((shf)->errnosv)
1705 #define shf_clearerr(shf) ((shf)->flags &= ~(SHF_EOF | SHF_ERROR))
1721 #define SHF_ALLOCS 0x0200 /* shf and shf->buf were alloc()ed */
1722 #define SHF_ALLOCB 0x0400 /* shf->buf was alloc()ed */
1729 struct shf {
1730 Area *areap; /* area shf/buf were allocated in */
1744 extern struct shf shf_iob[];
2167 struct shf *shf;
2196 struct shf *shf;
2582 void quitenv(struct shf *);
2652 void print_value_quoted(struct shf *, const char *);
2680 /* shf.c */
2681 struct shf *shf_open(const char *, int, int, int);
2682 struct shf *shf_fdopen(int, int, struct shf *);
2683 struct shf *shf_reopen(int, int, struct shf *);
2684 struct shf *shf_sopen(char *, ssize_t, int, struct shf *);
2685 int shf_close(struct shf *);
2686 int shf_fdclose(struct shf *);
2687 char *shf_sclose(struct shf *);
2688 int shf_flush(struct shf *);
2689 ssize_t shf_read(char *, ssize_t, struct shf *);
2690 char *shf_getse(char *, ssize_t, struct shf *);
2691 int shf_getchar(struct shf *s);
2692 int shf_ungetc(int, struct shf *);
2694 int shf_getc(struct shf *);
2695 int shf_putc(int, struct shf *);
2700 int shf_putchar(int, struct shf *);
2701 ssize_t shf_puts(const char *, struct shf *);
2702 ssize_t shf_write(const char *, ssize_t, struct shf *);
2703 ssize_t shf_fprintf(struct shf *, const char *, ...)
2710 ssize_t shf_vfprintf(struct shf *, const char *, va_list)
2720 void fptreef(struct shf *, int, const char *, ...);
2728 void dumpchar(struct shf *, unsigned char);
2729 void dumptree(struct shf *, struct op *);
2730 void dumpwdvar(struct shf *, const char *);
2731 void dumpioact(struct shf *shf, struct op *t);
2734 void fpFUNCTf(struct shf *, int, bool, const char *, struct op *);