Home | History | Annotate | Download | only in src

Lines Matching refs:shf

2 /*	$OpenBSD: shf.h,v 1.6 2005/12/11 18:53:51 deraadt Exp $	*/
269 /* see the large comment in shf.c for an EBCDIC primer */
930 EXTERN const char Tbad_bsize[] E_INIT("bad shf/buf/bsize");
1091 #define Tbad_bsize "bad shf/buf/bsize"
1249 struct shf *shf;
1620 #define shf_fileno(shf) ((shf)->fd)
1621 #define shf_setfileno(shf,nfd) ((shf)->fd = (nfd))
1622 #define shf_getc_i(shf) ((shf)->rnleft > 0 ? \
1623 (shf)->rnleft--, (int)ord(*(shf)->rp++) : \
1624 shf_getchar(shf))
1625 #define shf_putc_i(c, shf) ((shf)->wnleft == 0 ? \
1626 shf_putchar((uint8_t)(c), (shf)) : \
1627 ((shf)->wnleft--, *(shf)->wp++ = (c)))
1628 #define shf_eof(shf) ((shf)->flags & SHF_EOF)
1629 #define shf_error(shf) ((shf)->flags & SHF_ERROR)
1630 #define shf_errno(shf) ((shf)->errnosv)
1631 #define shf_clearerr(shf) ((shf)->flags &= ~(SHF_EOF | SHF_ERROR))
1647 #define SHF_ALLOCS 0x0200 /* shf and shf->buf were alloc()ed */
1648 #define SHF_ALLOCB 0x0400 /* shf->buf was alloc()ed */
1655 struct shf {
1656 Area *areap; /* area shf/buf were allocated in */
1670 extern struct shf shf_iob[];
2083 struct shf *shf;
2112 struct shf *shf;
2496 void quitenv(struct shf *);
2564 void print_value_quoted(struct shf *, const char *);
2592 /* shf.c */
2593 struct shf *shf_open(const char *, int, int, int);
2594 struct shf *shf_fdopen(int, int, struct shf *);
2595 struct shf *shf_reopen(int, int, struct shf *);
2596 struct shf *shf_sopen(char *, ssize_t, int, struct shf *);
2597 int shf_close(struct shf *);
2598 int shf_fdclose(struct shf *);
2599 char *shf_sclose(struct shf *);
2600 int shf_flush(struct shf *);
2601 ssize_t shf_read(char *, ssize_t, struct shf *);
2602 char *shf_getse(char *, ssize_t, struct shf *);
2603 int shf_getchar(struct shf *s);
2604 int shf_ungetc(int, struct shf *);
2606 int shf_getc(struct shf *);
2607 int shf_putc(int, struct shf *);
2612 int shf_putchar(int, struct shf *);
2613 ssize_t shf_puts(const char *, struct shf *);
2614 ssize_t shf_write(const char *, ssize_t, struct shf *);
2615 ssize_t shf_fprintf(struct shf *, const char *, ...)
2622 shf *, const char *, va_list)
2632 void fptreef(struct shf *, int, const char *, ...);
2640 void dumpchar(struct shf *, int);
2641 void dumptree(struct shf *, struct op *);
2642 void dumpwdvar(struct shf *, const char *);
2643 void dumpioact(struct shf *shf, struct op *t);
2646 void fpFUNCTf(struct shf *, int, bool, const char *, struct op *);