-/* $OpenBSD: history.c,v 1.50 2015/10/21 15:20:37 mmcc Exp $ */
+/* $OpenBSD: history.c,v 1.51 2015/10/21 15:47:41 mmcc Exp $ */
/*
* command history
return 1;
}
- n = fstat(shf_fileno(shf), &statb) < 0 ? 128 :
+ n = fstat(shf->fd, &statb) < 0 ? 128 :
statb.st_size + 1;
Xinit(xs, xp, n, hist_source->areap);
while ((n = shf_read(xp, Xnleft(xs, xp), shf)) > 0) {
-/* $OpenBSD: shf.h,v 1.6 2005/12/11 18:53:51 deraadt Exp $ */
+/* $OpenBSD: shf.h,v 1.7 2015/10/21 15:47:41 mmcc Exp $ */
#ifndef SHF_H
# define SHF_H
#define SHF_BSIZE 512
-#define shf_fileno(shf) ((shf)->fd)
-#define shf_setfileno(shf,nfd) ((shf)->fd = (nfd))
#define shf_getc(shf) ((shf)->rnleft > 0 ? (shf)->rnleft--, *(shf)->rp++ : \
shf_getchar(shf))
#define shf_putc(c, shf) ((shf)->wnleft == 0 ? shf_putchar((c), (shf)) : \